<div class="modal fade in ip-box" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" aria-hidden="true"
    id="edit">
    <div class="modal-dialog modal-lg-f modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                
                <h4 class="modal-title" id="myModalLabel">权限管理 — 修改</h4>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            </div>
            <div class="modal-body">
                <form #editForm="ngForm">

                    <input type="text" name="operationId" class="hidden" style="display: none;" #operationId="ngModel" [ngModel]="getTabVal?.operationId">

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 control-label text-right">权限编码：</label>
                        <div class="col-xs-12 col-sm-9">
                            <input type="text" name="operationCode" class="form-control" autocomplete="off" required #operationCode="ngModel" [ngModel]="getTabVal?.operationCode">
                            <label class="red required">*</label>
                            <div class="error" *ngIf="operationCode.invalid && (operationCode.touched)">
                                <small class="error" *ngIf="operationCode.errors.required">权限编码不能为空</small>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 control-label text-right">权限名称：</label>
                        <div class="col-xs-12 col-sm-9">
                            <input type="text" name="operationName" class="form-control" autocomplete="off" required #operationName="ngModel" [ngModel]="getTabVal?.operationName">
                            <label class="red required">*</label>
                            <div class="error" *ngIf="operationName.invalid && (operationName.touched)">
                                <small class="error" *ngIf="operationName.errors.required">权限名称不能为空</small>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 control-label text-right">是否启用：</label>
                        <div class="col-xs-12 col-sm-9">
                            <!-- <select
                                   name="enable"                                  
                                  
                                   required
                                   #enable="ngModel"
                                   [ngModel]="getTabVal?.enable"
                                   >
								<option id="" [value]="0">禁用</option>
								<option id="" [value]="1" selected="">启用</option>
                            </select> -->
                            <label class="toggle toggle-positive" *ngIf="getTabVal">
                                <input type="checkbox" name="enable" #enable="ngModel" [(ngModel)]="getTabVal.enable" />
                                <div class="track">
                                    <div class="tit" *ngIf="getTabVal.enable">启用</div>
                                    <div class="tit right" *ngIf="!getTabVal.enable">禁用</div>
                                    <div class="handle"></div>
                                </div>
                            </label>
                            <!-- <app-selection [data]="selecdata"></app-selection> -->
                        </div>
                    </div>

                    <div class="form-group height-auto">
                        <label class="col-xs-12 col-sm-3 control-label text-right">描述：</label>
                        <div class="col-xs-12 col-sm-9">
                            <textarea rows="5" type="text" name="description" class="form-control" maxlength="100" [ngModel]="getTabVal?.description">                                    
                            </textarea>

                        </div>
                    </div>


                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" mat-raised-button data-dismiss="modal" (click)="reset()">取消</button>
                <button type="submit" class="btn btn-primary" mat-button [disabled]="editForm.invalid" (click)="submitEdit(editForm.value)"><span class="glyphicon glyphicon-pencil"></span> 修改</button>
            </div>
        </div>
    </div>
</div>